package com.lewis.system.monitor;

import com.lewis.core.base.domain.BaseResult;
import com.lewis.system.web.domain.Server;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 *
 * @author Lewis
 */
@RestController
@RequestMapping("/monitor/server")
public class ServerController {

    @GetMapping()
    public BaseResult getInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        return BaseResult.ok().setData(server);
    }

}
